This presentation will give you a brief background to JavaScript, what it is and where it comes from. Then it will walk you through general pitfalls, best practices and more advanced topics such as object-orientation, scope and closures.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Rust
Why do you care about Rust? Who has the time to learn all these new languages? It seems like a new one is popping up every other week and this trend is growing at an exponential rate. Good news, a fair number of them are crafted really well and efficiently solve specific problems. Bad news, how do you keep up with all of this, let alone decide which languages to include in your companies technology portfolio.
Despite the challenges of all these new languages, a majority of developers are intrigued about the idea of becoming a polyglot, but don't know where to begin or don't have the time. In my polyglot travels, there is one language of late that is the sure-fire answer to the above questions, Rust.
In this talk I’ll explore the value behind becoming more polyglotic as a developer, how to pick languages to learn, and then dive deep in the the language of Rust. Which in my opinion, is hands down the best up and coming languages to learn.
About the Presenter
Anthony Broad-Crawford has been a developer since the year 2000 with a short side stint as a semi-professional poker player. Since his transition to software development Anthony has...
1. Built 8 patent receiving technologies
2. Founded two global companies
3. Been a CTO (3x), CPO (1x), and CEO (1x)
and is currently the CTO at Fooda where he manages product, user experience, and engineering. Fooda is predominantly web and mobile technology company focused on bringing great & healthy food from the best restaurant's to people while at the office.
Through his career, in production applications Anthony has used Ruby, Java, Jave (Android), Objective-C and Swift, .NET, Erlang, Scala, Node.JS, LISP, Smalltalk, and even assembly, with his recent favorite, Rust . No, not all at the same time in the same application.
Anthony now spends his time building great teams, that leverage great technology, to build great products, but still looks to codes every chance he can get :)
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Most computers today have multiple cores and processes. That means, if you really want to fully explore the capabilities of them, you must explore concurrent programming resources. Go was developed with this in mind, offering goroutines and channels.
Although concurrent programming may seem simple with Go, there are a couple of details to keep in mind, to avoid problems. In this talk, I’m going to show a couple of practical examples with goroutines and channels, and some common pitfalls
As presented at Dutch PHP Conference 2015, an introduction to command buses, how to implement your own in PHP and why they're both useful but unimportant.
Building for Your Next Billion - Google I/O 2017Robert Nyman
New internet users are coming online around the world and are facing very different constraints to accessing the internet. In this talk, we'll cover what we've learned from building experiences for new internet users and walk through how you can build great experiences that work well for billions of users around the world.
This is a presentation from Google I/O 2017, the video is available at https://www.youtube.com/watch?v=wD3rpdiLMyY
Speakers: Tal Oppenheimer, Mariya Moeva, Robert Nyman
https://twitter.com/taloppenheimer
https://twitter.com/marrrr
https://twitter.com/robertnyman
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Most computers today have multiple cores and processes. That means, if you really want to fully explore the capabilities of them, you must explore concurrent programming resources. Go was developed with this in mind, offering goroutines and channels.
Although concurrent programming may seem simple with Go, there are a couple of details to keep in mind, to avoid problems. In this talk, I’m going to show a couple of practical examples with goroutines and channels, and some common pitfalls
As presented at Dutch PHP Conference 2015, an introduction to command buses, how to implement your own in PHP and why they're both useful but unimportant.
Building for Your Next Billion - Google I/O 2017Robert Nyman
New internet users are coming online around the world and are facing very different constraints to accessing the internet. In this talk, we'll cover what we've learned from building experiences for new internet users and walk through how you can build great experiences that work well for billions of users around the world.
This is a presentation from Google I/O 2017, the video is available at https://www.youtube.com/watch?v=wD3rpdiLMyY
Speakers: Tal Oppenheimer, Mariya Moeva, Robert Nyman
https://twitter.com/taloppenheimer
https://twitter.com/marrrr
https://twitter.com/robertnyman
New improvements for web developers - frontend.fi, HelsinkiRobert Nyman
New improvements for web developers - Promises, fetch, Service Workers, Push notifications, Add to Homescreen.
Slides from a talk I gave at #frontendfi in Helsinki yesterday
6. • Developed by Brendan Eich 1995
• Initially called Mocha, then LiveScript
• First day of light in a beta of Netscape 2
in December 1995
• IE followed suit with JScript in 1996
11. • JavaScript is one of the world’s most
popular programming languages
• One interpreter on every machine
• ECMAScript standardizing - Fifth edition
• Web browsers becoming much faster
33. null == undefined == 0 ==
false == ""
• Not really, but sort of
• Rather “truthy” or “falsy”
34. var a = null;
var b; // undefined
var c = 0;
var d = false;
var e = "";
if (a) // false
if (b) // false
if (c) // false
if (d) // false
if (e) // false
40. typeof fanClub // "undefined"
var title = "Armageddon";
typeof title // Equals "string"
var age = 37;
typeof age // Equals "number"
41. function anotherQuote () {
! return "If I ever woke up
with a dead hooker in my
hotel room, Matt would be
the first person I'd call.";
}
typeof anotherQuote; //"function"
42. var obj = {};
typeof obj = // "object"
var arr = ["B", "E", "N"];
typeof arr // "object"
68. • The prototype chain checks itself first
• It then goes to the parent, parent’s parent
etc...
69. function Being () {
! this.living = true;
}
Being.prototype.greet = function () {
! return "Hello!";
};
70. function Ben () {
! this.talks = true;
}
Ben.prototype = new Being;
Ben.prototype.saySomething = function () {
! return "I feel like fame is wasted on me.";
};
71. // Create an instance
var ben = new Ben();
// Returns "I feel like fame is wasted on me."
ben.saySomething();
// Returns "Hello!", inherited
// from the Being object
ben.greet();
72. Checking for the greet() method in this order:
• ben instance
• Ben prototype
• Being prototype
• Object prototype
73. • Simple JavaScript Inheritance
• A Base Class for JavaScript Inheritance
• Defining classes and inheritance
Class-based mimicking
74. • It’s native, i.e. no dependencies
• Freedom of style and version
• Easy readability
• Code handover
Why prototype syntax
75. “I have been writing JavaScript for 8 years
now, and I have never once found need to
use an uber function...
...I now see my early attempts to support the
classical model in JavaScript as a mistake.”
- Douglas Crockford
Why prototype syntax
82. function outer () {
! function inner () {
! ! return "Inner";
! }
! return inner();
}
outer(); // Accessible
inner(); // Not accessible
83. “Global scope is like a public toilet.
You can’t avoid going in there. But
try to limit your contact with
surfaces when you do.”
- Dmitry Baranovskiy, Raphaël JS
library
Polluting the global
namespace
96. • Closures are expressions, usually functions,
which can work with variables set within a
certain context
• Inner functions referring to local variables
of its outer function create closures
97. function add (x) {
! return function (y) {
! ! return x + y;
! };
}
var add5 = add(5);
var no7 = add5(2); // Equals 7
99. function add (x) {
! return function (y) {
! ! return x + y;
! };
}
var add5 = add(5);
// How JavaScript sees it
var add5 = function (y) {
! return 5 + y;
}
100. function add (x) {
! return function (y) {
! ! return x + y;
! };
}
var add5 = add(5);
// How JavaScript sees it
var add5 = function (y) {
! return 5 + y;
}
115. • Avoiding global variables
• Code structure
• Extending, but not necessarily inheriting
116. // Create a Ben object
var Ben = {};
// Set functionality
Ben.Director = function () {
! var noOfMovies = 4;
! return {
! ! movies : function () {
! ! ! return noOfMovies;
! ! }
! };
}();
117. // Assertion
if (typeof Ben === "undefined") {
! Ben = {};
}
Ben.Actor = function () {
! var noOfMovies = 51;
! return {
! ! actAndDirectorCount : function () {
! ! ! return noOfMovies + " as actor & "
+ Ben.Director.movies.call(this)
+ " as Director";
! ! }
! };
}();